package com.pxst.service.impl;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.context.annotation.ScopedProxyMode;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.alibaba.fastjson.JSONObject;
import com.pxst.service.TaskService;

/** 
* @author yangxy
* @version 创建时间：2023年8月16日 下午12:50:35 
*/
@Service
public class TaskServiceImpl implements TaskService {
	@Autowired
	private JdbcTemplate jdbcTemplate;

	@Override
	public List<Map<String, Object>> test() {
		// TODO Auto-generated method stub
		System.out.println("=================>>修改service22233355556666");
		String sql = "insert into test(name) value ('测试')";
        jdbcTemplate.update(sql);
        jdbcTemplate.update("insert into test1(name) value ('测试')");
        List<Map<String, Object>> queryForList = jdbcTemplate.queryForList("select * from test2");
        System.out.println("=================>>"+JSONObject.toJSONString(queryForList));
        return new ArrayList<>();
	}

}
